package com.sigerap.comensal.action;

import java.util.List;
import com.opensymphony.xwork2.ActionSupport;
import com.sigerap.comensal.model.Comensal;
import com.sigerap.comensal.service.ComensalService;

/**
 * 
 * @author Spirit-20121
 * @version 1.2
 * 
 *
 */


public class BuscarComensalAction extends ActionSupport {

	private List<Comensal> comensales;
	private Comensal comensal ;
	private ComensalService service;

	
	public BuscarComensalAction(){
		service = new ComensalService();
	}
	
	public String execute(){
		
		comensal=service.buscarxDni(comensal.getDni());
		return SUCCESS;
		
	}

	public List<Comensal> getComensales() {
		return comensales;
	}

	public void setComensales(List<Comensal> comensales) {
		this.comensales = comensales;
	}
	
	public Comensal getComensal() {
		return comensal;
	}
	
	public void setComensal(Comensal comensal) {
		this.comensal = comensal;
	}
	
}